using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;

namespace WindowsUserControl.TabbedDocuments
{
    /// <summary>
    /// 
    /// </summary>
    public class TabbedDocumentManager
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="dockManager"></param>
        /// <param name="parentForm"></param>
        /// <param name="docCtr"></param>
        /// <param name="docTitle"></param>
        /// <returns></returns>
        public static TD.SandDock.TabbedDocument AddNewTabbedDocument(TD.SandDock.SandDockManager dockManager, Form parentForm, UserControl docCtr, string docTitle)
        {
            TD.SandDock.DocumentContainer docContainer = new TD.SandDock.DocumentContainer();
            parentForm.Controls.Add(docContainer);
            TD.SandDock.TabbedDocument tabbedDoc = new TD.SandDock.TabbedDocument(dockManager, docContainer, docTitle);
            tabbedDoc.Open();
            tabbedDoc.Controls.Clear();
            tabbedDoc.Controls.Add(docCtr);
            docCtr.Dock = DockStyle.Fill;
            return tabbedDoc;
        }

        //public static void CloseTabbedDocument()
        //{
            
        //}

        //public static void OpenTabbedDocument(TD.SandDock.TabbedDocument tabbedDoc, UserControl docCtr, string filePath)
        //{
            
        //}
    }
}
